﻿using System;

namespace ToMPG
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("计算每百公里油耗到MPG（1加仑英里数）值");
            bool wrongInput;
            double kilo;
            do
            {
                Console.Write("输入每百公里油耗：");
                string kiloValue = Console.ReadLine();
                wrongInput = double.TryParse(kiloValue, out kilo);
            } while (!wrongInput);
            var gasConventer = new GasFee.GasPriceConventer();
            Console.WriteLine("MPG={0}", gasConventer.GetMpgFromLiterPerOneHundradKilometer(kilo));
            Console.ReadLine();
        }
    }
}
